package chapter_7;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;

public class Test6 {

    public static void main(String[] args) throws IOException {
        File file = new File("D:\\byte.txt");
        FileInputStream fis = new FileInputStream(file);
//        System.out.println((char)fis.read());
//        System.out.println((char)fis.read());
//        System.out.println((char)fis.read());
//        System.out.println((char)fis.read());
        byte[] bytes = new byte[fis.available()];
        fis.read(bytes);
        System.out.println(new String(bytes));
        fis.close();
    }
}
